//
//  YbrPlayer.h
//  wifibox
//
//  Created by os X 10.9 on 14-12-18.
//  Copyright (c) 2014年 yinbaner. All rights reserved.
//  播放的类

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>

#import "YbrMusicItem.h"

#define PlayerStateChange @"play_state_change"  // 播放状态发生改变的时候
#define MetaStateChange @"meta_state_change"    // 播放的项目发生改变的时候



@interface YbrPlayer : NSObject

@property(nonatomic,assign)int lastTime;

+(YbrPlayer *) getInstance;     // 获取单例播放器


-(void) addMusiclist:(NSArray *) musiclist position:(int) position;
// Arr : YbrMusicItem对象
-(void) playAll:(NSArray *) musiclist;
-(void) playAll:(NSArray *) musiclist position:(int) position;  // 添加了一个播放哪一个
-(void) playDlna;
// 返回Arr : 音频的ID(传递的列表的和当前的列表是否一样)
-(BOOL) isAlike:(NSArray *) musiclist;
// 返回Arr : YbrMusicItem 正在播放的Item
-(YbrMusicItem *) getQueueItem;

-(NSString *) getArtistName;
-(NSString *) getSingerName;
-(NSString *) getMusicName;
-(int) getDuration;
-(int) getPoisiton;

-(void) setQueuePosition:(int) index;
-(NSString *) getBitmap;
-(BOOL) isPlaying;
-(int) getQueuePosition;
// 正在播放的音频的ID
-(int) getAudioId;

-(void) Next;
-(void) Prev;
-(void) PlayOrPause;
-(void) Play ;
-(void) stop;
-(void) stopNoSendChange;
-(void) seek:(NSTimeInterval) pos;

-(BOOL) isHaveMusic;

+(BOOL)playState;

@end
